package cn.netswap.jeegorilla.framework.security.connect;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.social.config.annotation.EnableSocial;
import org.springframework.social.config.annotation.SocialConfigurerAdapter;
import org.springframework.social.connect.ConnectionFactoryLocator;
import org.springframework.social.connect.ConnectionRepository;
import org.springframework.social.connect.web.ConnectController;

/**
 * @author lgw
 * @version 1.0
 * @date 2020/3/26 12:20
 */
@Configuration
@EnableSocial
public class SocialConfiguration extends SocialConfigurerAdapter {
    @Bean
    public ConnectController connectController(ConnectionFactoryLocator connectionFactoryLocator, ConnectionRepository connectionRepository) {

        return new ConnectController(connectionFactoryLocator, connectionRepository);
    }
}
